module.exports = {
  mode: 'development',
  devtool: 'source-map',
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /@babel(?:\/|\\{1,2})runtime/, // 排除 @babel里面的转换api的库等
        // exclude: /lodash/, lodash 本身就是 用es5 写的 不用babel 转换
        use: [
          // {
          //   loader: "cache-loader",
          //   options:{
          //     cacheDirectory: "./cache" //缓存的目录
          //   }
          // },
          'thread-loader',
          'babel-loader',
        ],
      },
    ],
  },
};
